package com.qk.management.mapper;

import com.qk.entity.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseMapper {
    List<Course> selectByPage(String name, Integer subject, Integer target);

    @Select("select * from course where id = #{id}")
    Course selectById(Integer id);

    void update(Course course);

    void add(Course course);

    @Select("delete from course where id = #{id}")
    void delete(Integer id);

    @Select("select * from course")
    List<Course> list();

    @Select("select * from course where subject = #{subject}")
    List<Course> listBySubject(Integer subject);
}
